package cn.yulezhisi.shiro.factory;

import java.util.LinkedHashMap;

/**
 * 构建权限限制    LinkedHashMap
 * 把权限放到数据库管理
 *
 * @author yulezhisi
 **/

public class FilterChainDefinitionMapBuilder{
    
    public LinkedHashMap<String, String> builderFilterChainDefinitionMap() {
        
        LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
        
        //模拟从数据库查权限; 一定要按顺序存入
        
        map.put("/css/**  ", "anon");
        map.put("/js/**    ", "anon");
        map.put("/images/**", "anon");
        map.put("/layui/** ", "anon");
        map.put("/index.jsp", "authc");
        map.put("/logout", "logout");
        
        return map;
    }
}



















